package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.sql.Date;
import java.util.Objects;

@Entity
@Table(name = "check_", schema = "boot", catalog = "")
//审核表
public class Check {
    private int checkId;//审核id
    private String checkCause;//审核事由
    private String checkType;//审核类型
    private Date checkDate;//申请时间
    private Integer checkStaff;//员工编号
    private Integer checkName;//审核人
    private String checkCondition;//审核状态

    @Id
    @Column(name = "Check_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getCheckId() {
        return checkId;
    }

    public void setCheckId(int checkId) {
        this.checkId = checkId;
    }

    @Basic
    @Column(name = "Check_cause", nullable = true, length = 500)
    public String getCheckCause() {
        return checkCause;
    }

    public void setCheckCause(String checkCause) {
        this.checkCause = checkCause;
    }

    @Basic
    @Column(name = "Check_type", nullable = true, length = 500)
    public String getCheckType() {
        return checkType;
    }

    public void setCheckType(String checkType) {
        this.checkType = checkType;
    }

    @Basic
    @Column(name = "Check_date", nullable = true)
    public Date getCheckDate() {
        return checkDate;
    }

    public void setCheckDate(Date checkDate) {
        this.checkDate = checkDate;
    }

    @Basic
    @Column(name = "Check_staff", nullable = true)
    public Integer getCheckStaff() {
        return checkStaff;
    }

    public void setCheckStaff(Integer checkStaff) {
        this.checkStaff = checkStaff;
    }

    @Basic
    @Column(name = "Check_name", nullable = true)
    public Integer getCheckName() {
        return checkName;
    }

    public void setCheckName(Integer checkName) {
        this.checkName = checkName;
    }

    @Basic
    @Column(name = "Check_condition", nullable = true, length = 500)
    public String getCheckCondition() {
        return checkCondition;
    }

    public void setCheckCondition(String checkCondition) {
        this.checkCondition = checkCondition;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Check check = (Check) o;
        return checkId == check.checkId &&
                Objects.equals(checkCause, check.checkCause) &&
                Objects.equals(checkType, check.checkType) &&
                Objects.equals(checkDate, check.checkDate) &&
                Objects.equals(checkStaff, check.checkStaff) &&
                Objects.equals(checkName, check.checkName) &&
                Objects.equals(checkCondition, check.checkCondition);
    }

    @Override
    public int hashCode() {
        return Objects.hash(checkId, checkCause, checkType, checkDate, checkStaff, checkName, checkCondition);
    }
}
